package com.acoffee.service.Impl;

import com.acoffee.mapper.RbacRoleMapper;
import com.acoffee.pojo.RbacRole;
import com.acoffee.service.RbacRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author acoffee
 * @create 2021-11-27 15:27
 */
@Service
public class RbacRoleServiceImpl implements RbacRoleService {
    @Autowired
    RbacRoleMapper rbacRoleMapper;

    @Override
    public List<RbacRole> queryAll() {
        List<RbacRole> roles = rbacRoleMapper.queryAll();
        return roles;
    }

    @Override
    public RbacRole queryOne(int id) {
        RbacRole role = rbacRoleMapper.queryOne(id);
        return role;
    }

    @Override
    public boolean updateOne(RbacRole role) {
        boolean flag = rbacRoleMapper.updateOne(role);
        return flag;
    }

    @Override
    public boolean addOne(RbacRole role) {
        boolean flag = rbacRoleMapper.addOne(role);
        return flag;
    }

    @Override
    public boolean deleteOne(int id) {
        boolean flag = rbacRoleMapper.deleteOne(id);
        return flag;
    }
}
